/********************************************************/
/*	Copyright (C) 2016 Gong Li Bin		 	*/
/*	Project:	GoLib-1.0.0			*/
/*	Author:		gong_libin			*/
/*	Date:		2016_01_01			*/
/*	File:		GoMap.go			*/
/********************************************************/

package GoCap

import (
)

type GoMap	struct {
	mp	map[interface{}] interface{}
}

func (m *GoMap) GoMapHandle() *map[interface{}] interface{} {
	return &m.mp
}

func (m *GoMap) GoMapCreate(t uint) {
	m.mp = make(map[interface{}] interface{}, t)
}

func (m *GoMap) GoMapDelete(k interface{}) {
	delete(m.mp, k)
}

func (m *GoMap) GoMapInsert(k, v interface{}) {
	m.mp[k] = v
}

func (m *GoMap) GoMapUpdate(k, v interface{}) {
	m.GoMapDelete(k)
	m.GoMapInsert(k, v)
}

func (m *GoMap) GoMapSelect(k interface{}) (interface{}, bool) {
	var r bool
	var v interface{}
	v, r = m.mp[k]
	return v, r
}
